Hello people!!!
this is my first wrapper function of any kind and is aimed at providing a simpler solution for using threads in c++. I found it too clumsy to be messing about with all the API's, etc... within the main program, and making everything ugly, so I decided to code this.

Well, the header file "uThread.h" is the main file containing the "sThread" class. You can assing events like OnExecute, OnSuspend, etc...

eg:
void MyFunction()
	{
	//do something
	}
	.
	.
	.
	.
	.

sThread t(TRUE);
t.OnExecute = MyFunction;
t.Resume();

so, the function MyFunction will be executed when the thrtead is executed. The parameter (TRUE) specifies whether to create a suspended thread or not. Read up the MSDN documentation on "threads", and the header file will make a lot of sense, and will also make life a lot more easier for all you multithread programmers.

Other functions are:
--------------------
OnExecute()
OnSuspend() --> Executes when thread is suspended.
OnResume() --> Executes when thread is resumed.
OnTerminate() --> Executes when thread function terminates.
OnDestroy() --> Executes when thread object is destroyed.
GetPriorityLevel() --> Gets the priority of the thread. Look up the MSDN documentation on the values that you recieve;
SetPriorityLevel(int) --> Sets the thread priority level.

I have included an example along with a "sCriticalSection" object named "thrtest.cpp". Please go thru it for better understanding of how the class works.

If you find any bugs, or want to ask something, or have any suggestions, please feel free to write to: dhruvbird@hotmail.com

My home page is: http://www.memboost.50g.com/
MemBoost is a memory optimizing application.
